﻿namespace TopHero
{
    public static class Debug
    {
        private static IDebugService _debugService;

        public static void SetDebug(IDebugService debug)
        {
            _debugService = debug;
        }

        public static void LogError(object message) => _debugService.LogError(message);
        public static void Log(object message) => _debugService.Log(message);
        public static void LogWarning(object message) => _debugService.LogWarning(message);

        public static void LogErrorFormat(string format, params object[] args) =>
            _debugService.LogErrorFormat(format, args);

        public static void LogFormat(string format, params object[] args) => _debugService.LogFormat(format, args);

        public static void LogWarningFormat(string format, params object[] args) =>
            _debugService.LogWarningFormat(format, args);

        public static void Assert(bool condition, object message) => _debugService.Assert(condition, message);

        public static void Assert(bool condition)
        {
            _debugService.Assert(condition, "Assertion failed");
        }
    }
}